package com.xzy.ec.result;


import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor

public enum ResponseEnum {

    SUCCESS(0,"成功"),
    ERROR(-1,"服务器内部错误"),

    //-1xx 服务器错误
    BAD_SQL_GRAMMAR_ERROR(-101, "sql语法错误"),
    SERVLET_ERROR(-102, "servlet请求异常"),
    UPLOAD_ERROR(-103, "文件上传错误"),
    EXPORT_DATA_ERROR(104, "数据导出失败"),


    //-2xx 登录
    LOGIN_ERROR(-201,"用户名或密码错误" ),
    MOBILE_ERROR(-202,"电话号码格式错误"),
    UNLOG_ERROR(-203,"未登录"),
    REQUEST_ERROR(-204,"非法请求"),

    //-3xx 参数
    BINDE_ERROR(-300,"参数校验异常"),

    //-4xx 请求数据
    DATANOTFIND_ERROR(-401,"请求数据不存在"),
    GOODSNULL_ERROR(-402,"请求货物为空"),
    ORDEREXIST_ERROR(-403,"订单重复"),
    TELEPHONE_NULL_ERROR(-404,"手机号码不存在"),
    ACCESS_LIMIT_REAHCED(-405,"请求过于频繁"),
    SESSION_ERROR(-406,"用户不存在"),
    ;
    //响应状态码
    private Integer code;

    //响应信息
    private  String message;

}
